package com.yanqu.road.entity.union.huaben;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;


@FieldTypeAnnotation(tableName = "t_c_hua_ben_attack_damage", desc = "商会话本-攻击伤害")
public class UnionHuaBenAttackDamageData extends DataObject {

    @FieldTypeAnnotation(desc = "周id", update = true, select = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "商会uid", update = true)
    private String unionUid;

    @FieldTypeAnnotation(desc = "区服id")
    private long serverId;

    @FieldTypeAnnotation(desc = "关卡")
    private int level;

    //怪/伤害
    @FieldTypeAnnotation(desc = "攻击记录")
    Map<Integer, List<UnionHuaBenUserAttack>> damageMap = new ConcurrentHashMap<>();

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if(this.weekId != weekId) {
            this.weekId = weekId;
            setUpdateOption();
        }
    }

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        if(!Objects.equals(this.unionUid,unionUid)) {
            this.unionUid = unionUid;
            setUpdateOption();
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if(this.serverId != serverId) {
            this.serverId = serverId;
            setUpdateOption();
        }
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        if(this.level != level) {
            this.level = level;
            setUpdateOption();
        }
    }

    public void setDamageMap(Map<Integer, List<UnionHuaBenUserAttack>> damageMap) {
        this.damageMap = damageMap;
        setUpdateOption();
    }

    public Map<Integer, List<UnionHuaBenUserAttack>> getDamageMap() {
        return damageMap;
    }

}
